<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GSoC2011SfM: D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/CameraPinholeDistor.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">GSoC2011SfM
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">Google Summer of Code 2011: Structure from motion</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/CameraPinholeDistor.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _GSOC_SFM_CAMERA_PINHOLE_DISTORTION_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _GSOC_SFM_CAMERA_PINHOLE_DISTORTION_H 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">//A lot of methods are inspired of LIBMV project ( http://code.google.com/p/libmv_core/ )</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;macro.h&quot;</span> <span class="comment">//SFM_EXPORTS</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;CameraPinhole.h&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;opencv2/imgproc/imgproc.hpp&quot;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="keyword">namespace </span>OpencvSfM{
<a name="l00011"></a>00011   <span class="keyword">enum</span> paramsOfDistoParameters{
<a name="l00012"></a>00012     RADIAL_PARAM=0x10,  
<a name="l00013"></a>00013     TANGEANT_PARAM=0x20  
<a name="l00014"></a>00014   };
<a name="l00015"></a>00015 
<a name="l00016"></a>00016   
<a name="l00024"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html">00024</a>   <span class="keyword">class </span>SFM_EXPORTS <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinholeDistor</a>:<span class="keyword">public</span> <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinhole</a>{
<a name="l00025"></a>00025   <span class="keyword">protected</span>:
<a name="l00026"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#ad3b352db4b127864bcd901e11d7e50dc">00026</a>     cv::Vec&lt;double, 6&gt; <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#ad3b352db4b127864bcd901e11d7e50dc" title="used to store radial dist parameters ( /f$k_1/f$ to /f$k_6/f$ )">radial_dist_</a>;
<a name="l00027"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#a99247804700d8c8bfaf50a4e84cfb080">00027</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#a99247804700d8c8bfaf50a4e84cfb080" title="number of radial dist parameters ( 0, 2, 3 or 6 )">nb_radial_params_</a>;
<a name="l00028"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#ae09ea3c12a8e19788d084b357f11a902">00028</a>     cv::Vec&lt;double, 2&gt; <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#ae09ea3c12a8e19788d084b357f11a902" title="used to store tangential dist parameters ( /f$p_1/f$ and /f$p_2/f$ )">tangential_dist_</a>;
<a name="l00029"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#a80906d90106b91c391449d4cb9fd32e7">00029</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#a80906d90106b91c391449d4cb9fd32e7" title="N umbers of tangeancial distorition parameters (0, 1 or 2)">nb_tangent_params_</a>;
<a name="l00030"></a><a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#af9ce33321472dbbb71668b266225060b">00030</a>     cv::Mat <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html#af9ce33321472dbbb71668b266225060b" title="vector of distortion coefficients ( k_1, k_2, p_1, p_2[ , k_3[ , k_4, k_5, k_6 ]] ) of 4...">distortionVector</a>;
<a name="l00031"></a>00031  
<a name="l00032"></a>00032   <span class="keyword">public</span>:
<a name="l00041"></a>00041     <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinholeDistor</a>( cv::Mat intra_params=cv::Mat::eye( 3, 3, CV_64F ),cv::Vec6d radial_dist=cv::Vec6d( 0.0,0.0,0.0,0.0,0.0,0.0 ),<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nbRadialParam=6,cv::Vec2d tangential_dist=cv::Vec2d( 0.0,0.0 ),<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> wantedEstimation=FOCAL_PARAM|SKEW_PARAM|PRINCIPAL_POINT_PARAM|RADIAL_PARAM|TANGEANT_PARAM );
<a name="l00054"></a>00054     <a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinholeDistor</a>( <span class="keyword">const</span> std::vector&lt;std::vector&lt;cv::Point3f&gt; &gt;&amp; objectPoints,
<a name="l00055"></a>00055       <span class="keyword">const</span> std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt;&amp; imagePoints, cv::Size imageSize,<span class="keywordtype">double</span> aspectRatio=1.,
<a name="l00056"></a>00056       cv::Vec6d radial_dist=cv::Vec6d( 0.0,0.0,0.0,0.0,0.0,0.0 ),
<a name="l00057"></a>00057       <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nbRadialParam=6,
<a name="l00058"></a>00058       cv::Vec2d tangential_dist=cv::Vec2d( 0.0,0.0 ),
<a name="l00059"></a>00059       <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> wantedEstimation=FOCAL_PARAM|SKEW_PARAM|PRINCIPAL_POINT_PARAM|RADIAL_PARAM|TANGEANT_PARAM );
<a name="l00060"></a>00060     ~<a class="code" href="class_opencv_sf_m_1_1_camera_pinhole_distor.html" title="This class represent the physical device which take the pictures. It is not related to a 3D position ...">CameraPinholeDistor</a>( );
<a name="l00061"></a>00061 
<a name="l00069"></a>00069     <span class="keywordtype">void</span> updateDistortionParameters( <span class="keyword">const</span> cv::Vec6d&amp; radial_dist, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nbRadialParam,<span class="keyword">const</span> cv::Vec2d&amp; tangential_dist,
<a name="l00070"></a>00070       <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> wantedEstimation=RADIAL_PARAM|TANGEANT_PARAM );
<a name="l00071"></a>00071 
<a name="l00075"></a>00075     <span class="keyword">virtual</span> std::vector&lt;cv::Vec4d&gt; convertFromImageTo3Dray( std::vector&lt;cv::Vec3d&gt; points );
<a name="l00076"></a>00076     
<a name="l00082"></a>00082     <span class="keyword">virtual</span> std::vector&lt;cv::Vec2d&gt; pixelToNormImageCoordinates( std::vector&lt;cv::Vec2d&gt; points ) <span class="keyword">const</span>;
<a name="l00088"></a>00088     <span class="keyword">virtual</span> std::vector&lt;cv::Vec2d&gt; normImageToPixelCoordinates( std::vector&lt;cv::Vec2d&gt; points ) <span class="keyword">const</span>;
<a name="l00089"></a>00089     
<a name="l00094"></a>00094     <span class="keyword">static</span> cv::Ptr&lt;Camera&gt; read( <span class="keyword">const</span> cv::FileNode&amp; node );
<a name="l00095"></a>00095     
<a name="l00100"></a>00100     <span class="keyword">virtual</span> <span class="keywordtype">void</span> write( cv::FileStorage&amp; fs ) <span class="keyword">const</span>;
<a name="l00101"></a>00101 
<a name="l00102"></a>00102   };
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 }
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 21 2011 16:45:52 for GSoC2011SfM by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
